package com.production.CoursePlatform.service;

import com.production.CoursePlatform.entity.Course;
import com.production.CoursePlatform.mapper.CourseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class CourseService {
    @Autowired
    private CourseMapper courseMapper;

    public List<Course> teacherCourse(String tID){
        List<Course> courseList=courseMapper.findCoursesByTeacher(tID);
        return courseList;
    }

    public List<Course> studentCourse(String sID){
        List<Course> courseList=courseMapper.findCoursesByStudent(sID);
        return courseList;
    }

}
